﻿using CommunityToolkit.Mvvm.ComponentModel;
using System;

namespace TVideo.ViewModel
{
    public class BrowserViewModel : ObservableObject
    {
        private string _url = "";
        private string _address = "";

        public string Url
        {
            get => _url;
            set
            {
                SetProperty(ref _url, value);

                UrlChanged?.Invoke(_url);
            }
        }

        public string Address
        {
            get => _address;
            set => SetProperty(ref _address, value);
        }

        public Action<string>? UrlChanged { get; set; }
    }
}
